<template>
	<view class="content">
		<view class="bgColor">
			<image src="/static/examine/msgBg.png" mode=""></image>
		</view>
		<cusHeaderVue titleContent="请假" :showBack="true"></cusHeaderVue>
		<scroll-view scroll-y="true"
			:style="{paddingTop: `calc(${scrollerHeight} + 90rpx)`,height: `calc(100vh - ${scrollerHeight} - 90rpx`}">
			<view class="contBox">
				<view class="contTop">
					<view class="contTopInpt">
						<view class="contTopInptName">
							请假类型
						</view>
						<view class="contTopInptRight">
							请选择
							<u-icon name="arrow-right" color="#5A5964" size="15"></u-icon>
						</view>
					</view>
					<view class="contTopInpt">
						<view class="contTopInptName">
							开始时间
						</view>
						<view class="contTopInptRight">
							请选择
							<u-icon name="arrow-right" color="#5A5964" size="15"></u-icon>
						</view>
					</view>
					<view class="contTopInpt">
						<view class="contTopInptName">
							结束时间
						</view>
						<view class="contTopInptRight">
							请选择
							<u-icon name="arrow-right" color="#5A5964" size="15"></u-icon>
						</view>
					</view>
					<view class="contTopInpt">
						<view class="contTopInptName">
							时长(天)
						</view>
						<view class="contTopInptRight">
							<input type="text" placeholder="请输入时长" placeholder-style="color: #5a5964;" />
							<u-icon name="arrow-right" color="#5A5964" size="15"></u-icon>
						</view>
					</view>
				</view>
				<view class="personBox">
					<view class="approvalTit">
						请假事由
					</view>
					<textarea placeholder="请输入请假事由" placeholder-style="color: #5A5964;"></textarea>
				</view>
				<view class="personBox">
					<view class="approvalTit">
						图片
					</view>
					<view class="popupImg">
						<view class="popupImgLi">
							<image src="/static/home/zhaopikan.png" mode=""></image>
						</view>
					</view>
				</view>
			</view>
		</scroll-view>
		<view class="btnBox">
			<view class="btnLi">
				确认提交
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		onLoad,
	} from '@dcloudio/uni-app';
	import {
		ref
	} from 'vue';
	import cusHeaderVue from '@/components/cus-header.vue';
	const scrollerHeight = ref('');



	//获取状态栏高度
	const getBarHeight = () => {
		uni.getSystemInfo({
			success: function(res) {
				scrollerHeight.value = res.statusBarHeight + 'px'
			}
		});
	}

	const toUrl = (urlSrc) => {
		uni.navigateTo({
			url: urlSrc
		})
	}
	onLoad(() => {
		getBarHeight();
	})
</script>

<style lang="scss" scoped>
	.content {
		width: 100%;
		height: 100vh;
	}

	.bgColor {
		width: 100%;
		height: 740rpx;
		position: absolute;
		z-index: -1;
		top: 0;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.contBox {
		padding: 22rpx;
		box-sizing: border-box;
		padding-bottom: calc(env(safe-area-inset-bottom) + 101rpx);

		.contTop {
			width: 100%;
			border-radius: 12.82rpx;
			background: #ffffff;
			box-shadow: 2.56rpx 4.49rpx 10.9rpx 0.64rpx #c0c0c03b;
			padding: 34rpx 32rpx 1rpx;
			box-sizing: border-box;

			.contTopInpt {
				display: flex;
				align-items: center;
				margin-bottom: 50rpx;

				.contTopInptName {
					color: #1c2027;
					font-weight: 500;
					font-size: 28.21rpx;
				}

				.contTopInptRight {
					display: flex;
					align-items: center;
					justify-content: space-between;
					margin-left: 28rpx;
					flex: 1;
					color: #5a5964;
					font-weight: 400;
					font-size: 28.21rpx;

					input {
						flex: 1;
					}
				}
			}


		}

		.personBox {
			width: 100%;
			border-radius: 12.82rpx 12.82rpx 12.82rpx 12.82rpx;
			background: #ffffff;
			margin-top: 21rpx;
			padding: 37rpx 33rpx 31rpx;
			box-sizing: border-box;

			.approvalTit {
				font-weight: 500;
				font-size: 33.33rpx;
				color: #1C2027;
				margin-bottom: 23rpx;
			}

			.popupImg {
				.popupImgLi {
					margin-top: 21rpx;
					width: 196.15rpx;
					height: 196.15rpx;
					border-radius: 10.26rpx 10.26rpx 10.26rpx 10.26rpx;
					background: #f4f6f991;
					display: flex;
					align-items: center;
					justify-content: center;
					border: 1px solid #eaecf1;

					image {
						width: 62.82rpx;
						height: 45.51rpx;
					}
				}
			}

			textarea {
				font-weight: 400;
				font-size: 28.21rpx;
				height: 200rpx;
				width: 100%;
			}
		}





	}

	.btnBox {
		display: flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		// bottom: calc(env(safe-area-inset-bottom) + 20rpx);
		bottom: 0;
		width: 100%;
		left: 0;
		padding: 20rpx 55rpx calc(env(safe-area-inset-bottom) + 20rpx);
		box-sizing: border-box;
		background: #f2f3f5;

		.btnLi {
			height: 80rpx;
			border-radius: 40.38rpx 40.38rpx 40.38rpx 40.38rpx;
			background: linear-gradient(-90deg, #feaf38, #f98434);
			box-shadow: 0 3.85rpx 4.49rpx 0 #f984344d;
			color: #ffffff;
			width: 512.82rpx;
			
			font-size: 32.05rpx;
			font-weight: 400;
			display: flex;
			align-items: center;
			justify-content: center;
		}

		
	}
</style>